<?php
class Default_Check_Action extends NICED_Action 
{       
	public function execute() 
	{
		$controller = $this->getController();
		$request    = $controller->getRequest();		
		
		$model = $controller->getModel('Sample.Index');
        $dao = NICED_DaoFactory::create('test');
        $sql = $dao->getSql();
        $sql->setWhat('id');
        $sql->appendGroup('id');
        $sql->appendGroup('name');
        var_dump($sql->toString());
         $txn = new NICED_TransactionDao();
         $txn->attach($dao);
         $dao->execute();
         $cache = MemcacheFactory::create('query_memcache');
         $cache->set('name', 'nana');
         FS::pout($cache->get('name'));
		try
		{
			$message = $model->hello();
		}
		catch (Exception $e)
		{
			$controller->handleException(new NICED_Exception($e->getMessage()));
			return self::SUCCESS;
		}

		return self::SUCCESS;
	}

}//end class
